package com.project.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.project.bean.DiseaseBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 病害
 */
public interface DiseaseDao extends BaseMapper<DiseaseBean> {

    /**
     * 分页显示病害
     * @return
     */
    List<DiseaseBean> findAllDisease();

    /**
     * 添加
     * @param diseaseBean
     */
    void addDisease(DiseaseBean diseaseBean);

    /**
     * id查询
     * @param diseaseId
     * @return
     */
    DiseaseBean findId(@Param("diseaseId") int diseaseId);

    /**
     * 病害名发病症状模糊查询
     * @param diseaseName
     * @param diseaseSymptom
     * @return
     */
    IPage<DiseaseBean> findName(@Param("diseaseName") String diseaseName,
                                @Param("diseaseSymptom") String diseaseSymptom);
}
